<!--
 * @Description: 
 * @Author: chenjiaxin
 * @Date: 2022-05-22 14:18:04
 * @LastEditTime: 2022-05-22 16:42:30
 * @FilePath: \WebSkillExtend\20-纯CSS点击反馈\index.html
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>纯CSS点击事件</title>
    <style>
      .tag {
        width: 100px;
        height: 100px;
        background-color: green;
      }
      input[type="checkbox"]:checked + .tag {
        background-color: #f00;
      }
      #exp {
        /* opacity: 0; */
        /* visibility: hidden; */
        display: none;
      }
      #exp:checked + .btn {
        background-color: #f00;
      }
    </style>
  </head>
  <body>
    <input type="checkbox" name="" id="" />
    <div class="tag"></div>

    <hr />
    <input type="checkbox" name="" id="exp" />
    <label class="btn" for="exp">1111</label>
  </body>
</html>
